#ifndef		SYSTEM_SINGLETON_HEADER
#define		SYSTEM_SINGLETON_HEADER

#include	<FW/System/UnCopyable.h>


namespace System
{

template < typename T >
class	Singleton : UnCopyable
{
	static T *	mSingleton;
public:
				 Singleton		( void ) { mSingleton = static_cast < T * > ( this ); }
				~Singleton		( void ) { mSingleton = 0; }
	static T &	GetSingleton	( void ) { return ( * mSingleton ); }
	static T *	GetSingletonPtr	( void ) { return mSingleton; }
};

}

#endif